canSend

abstract fun canSend(id: Identifier, playerEntity: PlayerEntity?): Boolean

Checks whether a certain channel can be used for sending a packet. Works in both networking directions.

This should be paired with send to make sure the transmission will be possible before sending.

Return

whether the packet can be sent or not.

Author

fzzyhmstrs

Since

0.4.1

Parameters

id

Identifier the channel id. This would normally be CustomPayload.Id#id

playerEntity

PlayerEntity, nullable - the player associated with this network transmission. For the server that will be the server player you are sending to, for the client it can be null or the client player.